﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="PlugNT.Cms.Web.Admin.Pre_GroupPages.Edit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>修改后台权限页</title>
<link href="../css/control.css" rel="stylesheet" type="text/css" media="all" />
<script src="../js/jquery-1.3.2.min.js" type="text/javascript" ></script>
<script type="text/javascript">
    function setPageCode() {
        if ($.trim($("#txtPagePath").val()) != "") {
            var randstr = parseInt(Math.random() * 10000).toString();
            //var str = $.ajax({ url: $("#txtPagePath").val() + "?a=powercode&rand=" + randstr, async: true }).responseText;
            var str = $.get($("#txtPagePath").val(), { a: "powercode", rand: randstr }, function (data) {
                $("#hidPageCode").val(data);
                $("#spanMessage").html("已获取授权代码！");
            });
        }
        else {
            alert("请输入正确的页面地址！");
        }
    }
</script>
</head>
<body>

<div class="frmstatic" style="display:block">
    <span class="frmbar" style="margin:0 12px;"></span><span class="frmbar" style="margin:0 11px;"></span>
    <div class="nav_menu">
        <table cellspacing="0" cellpadding="0" border="0" width="100%">
          <tr>
            <td align="left">
                <table>
                    <tr>
                        <td><img src="../images/main_home.gif" width="16" height="16" /></td>
                        <td><label>模块&nbsp;&gt;&nbsp;授权页面管理&nbsp;&gt;&nbsp;修改授权页面</label></td>
                    </tr>
                </table>
            </td>
            <td align="right">
                <table>
                    <tr>
                        <td><img src="../images/arrow_left.png" width="16" height="16" /></td>
                        <td><label><a href="../GroupAdmin/Admin.aspx" class="sub_menu">权限组列表</a></label> | </td>
                        <td><label><a href="../GroupAdmin/Add.aspx" class="sub_menu">添加权限组</a></label> | </td>
                        <td><label><a href="./Admin.aspx" class="sub_menu_selected">页面授权列表</a></label> | </td>
                        <td><label><a href="./Add.aspx" class="sub_menu">添加授权页面</a></label> | </td>
                        <td><label><a href="javascript:window.history.back();" class="sub_menu">返回</a></label></td>
                    </tr>
                </table>
            </td>
          </tr>
        </table>
    </div>
    <span class="frmbar" style="margin:0 11px;"></span><span class="frmbar" style="margin:0 12px;"></span>
</div>

<div class="frmstatic" style="display:block; margin-top:10px;">
<form id="form1" runat="server">
<span class="frmbar" style="margin:0 12px;"></span><span class="frmbar" style="margin:0 11px;"></span>
<div class="controls">
            
          <table width="100%"  border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#ecf5ff">
            <tr>
              <td width="145" align="right" nowrap bgcolor="#F4FBFF">页面路径:</td>
              <td width="1040" bgcolor="#F4FBFF">
                <asp:TextBox ID="txtPagePath" runat="server"  CssClass="input"  Width="350px"></asp:TextBox>
                绝对路径
                <asp:HiddenField ID="hidReferrer" runat="server" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"  ErrorMessage="页面路径不能为空" ControlToValidate="txtPageName"></asp:RequiredFieldValidator> 
               </td>
            </tr>
            
            <tr>
              <td width="145" align="right" nowrap bgcolor="#F4FBFF">分组名称:</td>
              <td width="1040" bgcolor="#F4FBFF"><asp:TextBox CssClass="input" ID="txtGroupName" runat="server" Width="206px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                      ErrorMessage="分组名称不能为空" ControlToValidate="txtGroupName"></asp:RequiredFieldValidator> 
               </td>
            </tr>
            
            <tr>
              <td align="right" nowrap bgcolor="#F4FBFF">页面名称:</td>
              <td bgcolor="#F4FBFF"><asp:TextBox ID="txtPageName" runat="server"  CssClass="input"  Width="206px"></asp:TextBox>
                              <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                      ErrorMessage="页面名称不能为空" ControlToValidate="txtPageName"></asp:RequiredFieldValidator> 
              </td>
            </tr>
            
            
            <tr>
              <td bgcolor="#F4FBFF">&nbsp;</td>
              <td bgcolor="#F4FBFF">
                  <asp:HiddenField ID="hidPageCode" runat="server" Value="" />
                  <asp:Button BackColor="#F4FBFF" CssClass="bt" ID="btnEdit" runat="server" Text=" 确定 " onclick="btnEdit_Click"  />
                  <input type="button" class="bt" value="获取授权代码" onclick="setPageCode();" />
                  <span id="spanMessage"></span>
              </td>
            </tr>
          </table>

</div>
<span class="frmbar" style="margin:0 11px;"></span><span class="frmbar" style="margin:0 12px;"></span>
</form>
</div>

</body>
</html>